/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.mx.saco.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author jethro.gutierrez
 */
@Embeddable
public class ComprobanteConceptoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "id_comprobante")
    private int idComprobante;
    @Basic(optional = false)
    @Column(name = "id_concepto")
    private int idConcepto;
    @Basic(optional = false)
    @Column(name = "consecutivo")
    private int consecutivo;

    public ComprobanteConceptoPK() {
    }

    public ComprobanteConceptoPK(int idComprobante, int idConcepto, int consecutivo) {
        this.idComprobante = idComprobante;
        this.idConcepto = idConcepto;
        this.consecutivo = consecutivo;
    }

    public int getIdComprobante() {
        return idComprobante;
    }

    public void setIdComprobante(int idComprobante) {
        this.idComprobante = idComprobante;
    }

    public int getIdConcepto() {
        return idConcepto;
    }

    public void setIdConcepto(int idConcepto) {
        this.idConcepto = idConcepto;
    }

    public int getConsecutivo() {
        return consecutivo;
    }

    public void setConsecutivo(int consecutivo) {
        this.consecutivo = consecutivo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idComprobante;
        hash += (int) idConcepto;
        hash += (int) consecutivo;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ComprobanteConceptoPK)) {
            return false;
        }
        ComprobanteConceptoPK other = (ComprobanteConceptoPK) object;
        if (this.idComprobante != other.idComprobante) {
            return false;
        }
        if (this.idConcepto != other.idConcepto) {
            return false;
        }
        if (this.consecutivo != other.consecutivo) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.mx.saco.entity.ComprobanteConceptoPK[ idComprobante=" + idComprobante + ", idConcepto=" + idConcepto + ", consecutivo=" + consecutivo + " ]";
    }
    
}
